package com.example.demo.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.demo.custom.BaseService;
import com.example.demo.entity.CarsOrder;
import com.example.demo.entity.CarsOrder2;
import com.example.demo.entity.NewCar1;
import com.example.demo.entity.UsedCar1;
import com.example.demo.repository.CarsOrder2Repository;

@Service
public class CarsOrder2Service extends BaseService<CarsOrder2, Integer> {

	@Autowired
	CarsOrder2Repository CarsOrder2DAO;

	public List<CarsOrder2> findByCarsorder(CarsOrder carsOrder) {
		// TODO Auto-generated method stub
		return CarsOrder2DAO.findByCarsorder(carsOrder);
	}

	public List<CarsOrder2> findByCars(NewCar1 car) {
		// TODO Auto-generated method stub
		return CarsOrder2DAO.findByCars(car);
	}

	public List<CarsOrder2> findByCars2(UsedCar1 car) {
		// TODO Auto-generated method stub
		return CarsOrder2DAO.findByCars2(car);
	}

//	public List<CarsOrder2> findByCarsorderId(CarsOrder carsOrder) {
//		// TODO Auto-generated method stub
//		return CarsOrder2DAO.findByCarsorderId(carsOrder);
//	}
	public CarsOrder2 findByCarsorderId(Integer carsOrder) {
		// TODO Auto-generated method stub
		return CarsOrder2DAO.findByCarsorderId(carsOrder);
	}

}
